[Ivy]
[>Created: Thu Jan 24 10:56:01 ICT 2013]
13C659965D854DC7 3.17 #module
>Proto >Proto Collection #zClass
Ms0 MenuProcess Big #zClass
Ms0 RD #cInfo
Ms0 #process
Ms0 @TextInP .ui2RdDataAction .ui2RdDataAction #zField
Ms0 @TextInP .rdData2UIAction .rdData2UIAction #zField
Ms0 @TextInP .resExport .resExport #zField
Ms0 @TextInP .type .type #zField
Ms0 @TextInP .processKind .processKind #zField
Ms0 @AnnotationInP-0n ai ai #zField
Ms0 @TextInP .xml .xml #zField
Ms0 @TextInP .responsibility .responsibility #zField
Ms0 @RichDialogInitStart f0 '' #zField
Ms0 @RichDialogProcessStart f3 '' #zField
Ms0 @RichDialogProcessEnd f4 '' #zField
Ms0 @RichDialogProcessStep f6 '' #zField
Ms0 @RichDialogProcessStep f9 '' #zField
Ms0 @PushWFArc f5 '' #zField
Ms0 @Alternative f7 '' #zField
Ms0 @PushWFArc f8 '' #zField
Ms0 @PushWFArc f10 '' #zField
Ms0 @RichDialogProcessStep f12 '' #zField
Ms0 @PushWFArc f13 '' #zField
Ms0 @PushWFArc f15 '' #zField
Ms0 @PushWFArc f11 '' #zField
Ms0 @PushWFArc f14 '' #zField
Ms0 @RichDialogProcessStep f2 '' #zField
Ms0 @PushWFArc f16 '' #zField
Ms0 @PushWFArc f1 '' #zField
>Proto Ms0 Ms0 MenuProcess #zField
Ms0 f0 guid 13C659965EC83BF2 #txt
Ms0 f0 type ch.ivy.demo.component.Menu.MenuData #txt
Ms0 f0 method start() #txt
Ms0 f0 disableUIEvents true #txt
Ms0 f0 inParameterDecl 'ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent methodEvent = event as ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent;
<> param = methodEvent.getInputArguments();
' #txt
Ms0 f0 outParameterDecl '<> result;
' #txt
Ms0 f0 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>start()</name>
    </language>
</elementInfo>
' #txt
Ms0 f0 134 38 20 20 -17 -36 #rect
Ms0 f0 @|RichDialogInitStartIcon #fIcon
Ms0 f3 guid 13C66434504DD5CF #txt
Ms0 f3 type ch.ivy.demo.component.Menu.MenuData #txt
Ms0 f3 actionDecl 'ch.ivy.demo.component.Menu.MenuData out;
' #txt
Ms0 f3 actionTable 'out=in;
' #txt
Ms0 f3 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>employee</name>
        <nameStyle>8,5,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ms0 f3 326 38 20 20 -21 -35 #rect
Ms0 f3 @|RichDialogProcessStartIcon #fIcon
Ms0 f4 type ch.ivy.demo.component.Menu.MenuData #txt
Ms0 f4 230 342 20 20 13 0 #rect
Ms0 f4 @|RichDialogProcessEndIcon #fIcon
Ms0 f6 actionDecl 'ch.ivy.demo.component.Menu.MenuData out;
' #txt
Ms0 f6 actionTable 'out=in;
' #txt
Ms0 f6 actionCode 'import javax.faces.application.FacesMessage;  
import javax.faces.context.FacesContext;  
import org.primefaces.component.menuitem.MenuItem;  
import org.primefaces.component.submenu.Submenu;  
import org.primefaces.model.DefaultMenuModel;  
import org.primefaces.model.MenuModel;  

				in.leftMenuModel = new DefaultMenuModel();

				//First submenu  
        Submenu submenu = new Submenu();  
        submenu.setLabel("Dynamic Submenu 1");  
          
        MenuItem item = new MenuItem();  
        item.setValue("Dynamic Menuitem 1.1");  
        item.setUrl("#");  

				//item.addActionListener(item);
submenu.getChildren().add(item);  
          
        in.leftMenuModel.addSubmenu(submenu);  
          
        //Second submenu  
        submenu = new Submenu();  
        submenu.setLabel("Dynamic Submenu 2");  
          
        item = new MenuItem();  
        item.setValue("Dynamic Menuitem 2.1");  
        item.setUrl("#");  
        submenu.getChildren().add(item);  
          
        item = new MenuItem();  
        item.setValue("Dynamic Menuitem 2.2");  
        item.setUrl("#");  
        submenu.getChildren().add(item);  
          
        in.leftMenuModel.addSubmenu(submenu);  ' #txt
Ms0 f6 type ch.ivy.demo.component.Menu.MenuData #txt
Ms0 f6 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>init leftMenu for DepHR</name>
        <nameStyle>23,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ms0 f6 158 260 36 24 -72 -42 #rect
Ms0 f6 @|RichDialogProcessStepIcon #fIcon
Ms0 f9 actionDecl 'ch.ivy.demo.component.Menu.MenuData out;
' #txt
Ms0 f9 actionTable 'out=in;
' #txt
Ms0 f9 actionCode 'import ch.ivy.demo.UserInfo;
in.currentUser = ivy.session.getAttribute("user") as UserInfo;' #txt
Ms0 f9 type ch.ivy.demo.component.Menu.MenuData #txt
Ms0 f9 222 100 36 24 20 -2 #rect
Ms0 f9 @|RichDialogProcessStepIcon #fIcon
Ms0 f5 expr out #txt
Ms0 f5 327 53 258 100 #arcP
Ms0 f7 type ch.ivy.demo.component.Menu.MenuData #txt
Ms0 f7 226 162 28 28 14 0 #rect
Ms0 f7 @|AlternativeIcon #fIcon
Ms0 f8 expr out #txt
Ms0 f8 240 124 240 162 #arcP
Ms0 f10 expr in #txt
Ms0 f10 outCond 'in.currentUser != null && in.currentUser.userRole.startsWith("dep")' #txt
Ms0 f10 234 184 184 260 #arcP
Ms0 f12 actionDecl 'ch.ivy.demo.component.Menu.MenuData out;
' #txt
Ms0 f12 actionTable 'out=in;
' #txt
Ms0 f12 actionCode 'import javax.faces.application.FacesMessage;  
import javax.faces.context.FacesContext;  
import org.primefaces.component.menuitem.MenuItem;  
import org.primefaces.component.submenu.Submenu;  
import org.primefaces.model.DefaultMenuModel;  
import org.primefaces.model.MenuModel;  

				in.leftMenuModel = new DefaultMenuModel();

				//First submenu  
        Submenu submenu = new Submenu();  
        submenu.setLabel("Dynamic Submenu 1");  
          
        MenuItem item = new MenuItem();  
        item.setValue("Dynamic Menuitem 1.1");  
        item.setUrl("#");  
        submenu.getChildren().add(item);  
          
        in.leftMenuModel.addSubmenu(submenu);  
          
        //Second submenu  
        submenu = new Submenu();  
        submenu.setLabel("Dynamic Submenu 2");  
          
        item = new MenuItem();  
        item.setValue("Dynamic Menuitem 2.1");  
        item.setUrl("#");  
        submenu.getChildren().add(item);  
          
        item = new MenuItem();  
        item.setValue("Dynamic Menuitem 2.2");  
        item.setUrl("#");  
        submenu.getChildren().add(item);  
          
        in.leftMenuModel.addSubmenu(submenu);  ' #txt
Ms0 f12 type ch.ivy.demo.component.Menu.MenuData #txt
Ms0 f12 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>init LeftMenu For HR</name>
        <nameStyle>20,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ms0 f12 294 260 36 24 -53 -36 #rect
Ms0 f12 @|RichDialogProcessStepIcon #fIcon
Ms0 f13 expr in #txt
Ms0 f13 outCond 'in.currentUser  != null && in.currentUser.userRole.startsWith("hr")' #txt
Ms0 f13 246 184 303 260 #arcP
Ms0 f15 expr out #txt
Ms0 f15 152 53 222 100 #arcP
Ms0 f11 expr out #txt
Ms0 f11 186 284 233 344 #arcP
Ms0 f14 expr out #txt
Ms0 f14 301 284 246 344 #arcP
Ms0 f2 actionDecl 'ch.ivy.demo.component.Menu.MenuData out;
' #txt
Ms0 f2 actionTable 'out=in;
' #txt
Ms0 f2 actionCode //in.menuDisplay="guest"; #txt
Ms0 f2 type ch.ivy.demo.component.Menu.MenuData #txt
Ms0 f2 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>init menu</name>
        <nameStyle>9,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ms0 f2 222 276 36 24 20 -2 #rect
Ms0 f2 @|RichDialogProcessStepIcon #fIcon
Ms0 f16 expr in #txt
Ms0 f16 240 190 240 276 #arcP
Ms0 f1 expr out #txt
Ms0 f1 240 300 240 342 #arcP
>Proto Ms0 .type ch.ivy.demo.component.Menu.MenuData #txt
>Proto Ms0 .processKind RICH_DIALOG #txt
>Proto Ms0 -8 -8 16 16 16 26 #rect
>Proto Ms0 '' #fIcon
Ms0 f3 mainOut f5 tail #connect
Ms0 f5 head f9 mainIn #connect
Ms0 f9 mainOut f8 tail #connect
Ms0 f8 head f7 in #connect
Ms0 f7 out f10 tail #connect
Ms0 f10 head f6 mainIn #connect
Ms0 f7 out f13 tail #connect
Ms0 f13 head f12 mainIn #connect
Ms0 f0 mainOut f15 tail #connect
Ms0 f15 head f9 mainIn #connect
Ms0 f6 mainOut f11 tail #connect
Ms0 f11 head f4 mainIn #connect
Ms0 f12 mainOut f14 tail #connect
Ms0 f14 head f4 mainIn #connect
Ms0 f7 out f16 tail #connect
Ms0 f16 head f2 mainIn #connect
Ms0 f2 mainOut f1 tail #connect
Ms0 f1 head f4 mainIn #connect
